Integrand size = 33, antiderivative size = 191 \[ \int \frac {(A+B x) (d+e x)^2}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\frac {(A b-a B) e (b d-a e) x (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {(A b-a B) (a+b x) (d+e x)^2}{2 b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B (a+b x) (d+e x)^3}{3 b e \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {(A b-a B) (b d-a e)^2 (a+b x) \log (a+b x)}{b^4 \sqrt {a^2+2 a b x+b^2 x^2}} \]
(A*b-B*a)*e*(-a*e+b*d)*x*(b*x+a)/b^3/((b*x+a)^2)^(1/2)+1/2*(A*b-B*a)*(b*x+ a)*(e*x+d)^2/b^2/((b*x+a)^2)^(1/2)+1/3*B*(b*x+a)*(e*x+d)^3/b/e/((b*x+a)^2) ^(1/2)+(A*b-B*a)*(-a*e+b*d)^2*(b*x+a)*ln(b*x+a)/b^4/((b*x+a)^2)^(1/2)
Time = 1.06 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.62 \[ \int \frac {(A+B x) (d+e x)^2}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\frac {(a+b x) \left (b x \left (6 a^2 B e^2-3 a b e (4 B d+2 A e+B e x)+b^2 \left (3 A e (4 d+e x)+2 B \left (3 d^2+3 d e x+e^2 x^2\right )\right )\right )+6 (A b-a B) (b d-a e)^2 \log (a+b x)\right )}{6 b^4 \sqrt {(a+b x)^2}} \]
((a + b*x)*(b*x*(6*a^2*B*e^2 - 3*a*b*e*(4*B*d + 2*A*e + B*e*x) + b^2*(3*A* e*(4*d + e*x) + 2*B*(3*d^2 + 3*d*e*x + e^2*x^2))) + 6*(A*b - a*B)*(b*d - a *e)^2*Log[a + b*x]))/(6*b^4*Sqrt[(a + b*x)^2])
Time = 0.29 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.61, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {1187, 27, 86, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(A+B x) (d+e x)^2}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx\) |
\(\Big \downarrow \) 1187 |
\(\displaystyle \frac {b (a+b x) \int \frac {(A+B x) (d+e x)^2}{b (a+b x)}dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(a+b x) \int \frac {(A+B x) (d+e x)^2}{a+b x}dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \frac {(a+b x) \int \left (\frac {(A b-a B) (b d-a e)^2}{b^3 (a+b x)}+\frac {(A b-a B) e (b d-a e)}{b^3}+\frac {B (d+e x)^2}{b}+\frac {(A b-a B) e (d+e x)}{b^2}\right )dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(a+b x) \left (\frac {(A b-a B) (b d-a e)^2 \log (a+b x)}{b^4}+\frac {e x (A b-a B) (b d-a e)}{b^3}+\frac {(d+e x)^2 (A b-a B)}{2 b^2}+\frac {B (d+e x)^3}{3 b e}\right )}{\sqrt {a^2+2 a b x+b^2 x^2}}\) |
((a + b*x)*(((A*b - a*B)*e*(b*d - a*e)*x)/b^3 + ((A*b - a*B)*(d + e*x)^2)/ (2*b^2) + (B*(d + e*x)^3)/(3*b*e) + ((A*b - a*B)*(b*d - a*e)^2*Log[a + b*x ])/b^4))/Sqrt[a^2 + 2*a*b*x + b^2*x^2]
3.18.60.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (b_.)*(x_ ) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(a + b*x + c*x^2)^FracPart[p]/(c^ IntPart[p]*(b/2 + c*x)^(2*FracPart[p])) Int[(d + e*x)^m*(f + g*x)^n*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[b^2 - 4*a*c, 0] && !IntegerQ[p]
Time = 0.35 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.01
method | result | size |
risch | \(\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (\frac {1}{3} b^{2} B \,x^{3} e^{2}+\frac {1}{2} A \,b^{2} e^{2} x^{2}-\frac {1}{2} B a b \,e^{2} x^{2}+B \,b^{2} d e \,x^{2}-A a b \,e^{2} x +2 A \,b^{2} d e x +B \,a^{2} e^{2} x -2 B a b d e x +B \,b^{2} d^{2} x \right )}{\left (b x +a \right ) b^{3}}+\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (A \,a^{2} b \,e^{2}-2 A \,b^{2} d e a +A \,d^{2} b^{3}-B \,e^{2} a^{3}+2 B \,a^{2} b d e -B \,b^{2} d^{2} a \right ) \ln \left (b x +a \right )}{\left (b x +a \right ) b^{4}}\) | \(193\) |
default | \(\frac {\left (b x +a \right ) \left (2 B \,e^{2} x^{3} b^{3}+3 A \,b^{3} e^{2} x^{2}-3 B \,x^{2} a \,b^{2} e^{2}+6 B \,b^{3} d e \,x^{2}+6 A \ln \left (b x +a \right ) a^{2} b \,e^{2}-12 A \ln \left (b x +a \right ) a \,b^{2} d e +6 A \ln \left (b x +a \right ) b^{3} d^{2}-6 A x a \,b^{2} e^{2}+12 A \,b^{3} d e x -6 B \ln \left (b x +a \right ) a^{3} e^{2}+12 B \ln \left (b x +a \right ) a^{2} b d e -6 B \ln \left (b x +a \right ) a \,b^{2} d^{2}+6 B \,a^{2} b \,e^{2} x -12 B x a \,b^{2} d e +6 B \,b^{3} d^{2} x \right )}{6 \sqrt {\left (b x +a \right )^{2}}\, b^{4}}\) | \(212\) |
((b*x+a)^2)^(1/2)/(b*x+a)*(1/3*b^2*B*x^3*e^2+1/2*A*b^2*e^2*x^2-1/2*B*a*b*e ^2*x^2+B*b^2*d*e*x^2-A*a*b*e^2*x+2*A*b^2*d*e*x+B*a^2*e^2*x-2*B*a*b*d*e*x+B *b^2*d^2*x)/b^3+((b*x+a)^2)^(1/2)/(b*x+a)*(A*a^2*b*e^2-2*A*a*b^2*d*e+A*b^3 *d^2-B*a^3*e^2+2*B*a^2*b*d*e-B*a*b^2*d^2)/b^4*ln(b*x+a)
Time = 0.69 (sec) , antiderivative size = 158, normalized size of antiderivative = 0.83 \[ \int \frac {(A+B x) (d+e x)^2}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\frac {2 \, B b^{3} e^{2} x^{3} + 3 \, {\left (2 \, B b^{3} d e - {\left (B a b^{2} - A b^{3}\right )} e^{2}\right )} x^{2} + 6 \, {\left (B b^{3} d^{2} - 2 \, {\left (B a b^{2} - A b^{3}\right )} d e + {\left (B a^{2} b - A a b^{2}\right )} e^{2}\right )} x - 6 \, {\left ({\left (B a b^{2} - A b^{3}\right )} d^{2} - 2 \, {\left (B a^{2} b - A a b^{2}\right )} d e + {\left (B a^{3} - A a^{2} b\right )} e^{2}\right )} \log \left (b x + a\right )}{6 \, b^{4}} \]
1/6*(2*B*b^3*e^2*x^3 + 3*(2*B*b^3*d*e - (B*a*b^2 - A*b^3)*e^2)*x^2 + 6*(B* b^3*d^2 - 2*(B*a*b^2 - A*b^3)*d*e + (B*a^2*b - A*a*b^2)*e^2)*x - 6*((B*a*b ^2 - A*b^3)*d^2 - 2*(B*a^2*b - A*a*b^2)*d*e + (B*a^3 - A*a^2*b)*e^2)*log(b *x + a))/b^4
Leaf count of result is larger than twice the leaf count of optimal. 638 vs. \(2 (139) = 278\).
Time = 2.02 (sec) , antiderivative size = 638, normalized size of antiderivative = 3.34 \[ \int \frac {(A+B x) (d+e x)^2}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\begin {cases} \sqrt {a^{2} + 2 a b x + b^{2} x^{2}} \left (\frac {B e^{2} x^{2}}{3 b^{2}} + \frac {x \left (A e^{2} - \frac {5 B a e^{2}}{3 b} + 2 B d e\right )}{2 b^{2}} + \frac {2 A d e - \frac {2 B a^{2} e^{2}}{3 b^{2}} + B d^{2} - \frac {3 a \left (A e^{2} - \frac {5 B a e^{2}}{3 b} + 2 B d e\right )}{2 b}}{b^{2}}\right ) + \frac {\left (\frac {a}{b} + x\right ) \left (A d^{2} - \frac {a^{2} \left (A e^{2} - \frac {5 B a e^{2}}{3 b} + 2 B d e\right )}{2 b^{2}} - \frac {a \left (2 A d e - \frac {2 B a^{2} e^{2}}{3 b^{2}} + B d^{2} - \frac {3 a \left (A e^{2} - \frac {5 B a e^{2}}{3 b} + 2 B d e\right )}{2 b}\right )}{b}\right ) \log {\left (\frac {a}{b} + x \right )}}{\sqrt {b^{2} \left (\frac {a}{b} + x\right )^{2}}} & \text {for}\: b^{2} \neq 0 \\\frac {2 A d^{2} \sqrt {a^{2} + 2 a b x} + \frac {2 A d e \left (- a^{2} \sqrt {a^{2} + 2 a b x} + \frac {\left (a^{2} + 2 a b x\right )^{\frac {3}{2}}}{3}\right )}{a b} + \frac {A e^{2} \left (a^{4} \sqrt {a^{2} + 2 a b x} - \frac {2 a^{2} \left (a^{2} + 2 a b x\right )^{\frac {3}{2}}}{3} + \frac {\left (a^{2} + 2 a b x\right )^{\frac {5}{2}}}{5}\right )}{2 a^{2} b^{2}} + \frac {B d^{2} \left (- a^{2} \sqrt {a^{2} + 2 a b x} + \frac {\left (a^{2} + 2 a b x\right )^{\frac {3}{2}}}{3}\right )}{a b} + \frac {B d e \left (a^{4} \sqrt {a^{2} + 2 a b x} - \frac {2 a^{2} \left (a^{2} + 2 a b x\right )^{\frac {3}{2}}}{3} + \frac {\left (a^{2} + 2 a b x\right )^{\frac {5}{2}}}{5}\right )}{a^{2} b^{2}} + \frac {B e^{2} \left (- a^{6} \sqrt {a^{2} + 2 a b x} + a^{4} \left (a^{2} + 2 a b x\right )^{\frac {3}{2}} - \frac {3 a^{2} \left (a^{2} + 2 a b x\right )^{\frac {5}{2}}}{5} + \frac {\left (a^{2} + 2 a b x\right )^{\frac {7}{2}}}{7}\right )}{4 a^{3} b^{3}}}{2 a b} & \text {for}\: a b \neq 0 \\\frac {A d^{2} x + A d e x^{2} + \frac {A e^{2} x^{3}}{3} + \frac {B d^{2} x^{2}}{2} + \frac {2 B d e x^{3}}{3} + \frac {B e^{2} x^{4}}{4}}{\sqrt {a^{2}}} & \text {otherwise} \end {cases} \]
Piecewise((sqrt(a**2 + 2*a*b*x + b**2*x**2)*(B*e**2*x**2/(3*b**2) + x*(A*e **2 - 5*B*a*e**2/(3*b) + 2*B*d*e)/(2*b**2) + (2*A*d*e - 2*B*a**2*e**2/(3*b **2) + B*d**2 - 3*a*(A*e**2 - 5*B*a*e**2/(3*b) + 2*B*d*e)/(2*b))/b**2) + ( a/b + x)*(A*d**2 - a**2*(A*e**2 - 5*B*a*e**2/(3*b) + 2*B*d*e)/(2*b**2) - a *(2*A*d*e - 2*B*a**2*e**2/(3*b**2) + B*d**2 - 3*a*(A*e**2 - 5*B*a*e**2/(3* b) + 2*B*d*e)/(2*b))/b)*log(a/b + x)/sqrt(b**2*(a/b + x)**2), Ne(b**2, 0)) , ((2*A*d**2*sqrt(a**2 + 2*a*b*x) + 2*A*d*e*(-a**2*sqrt(a**2 + 2*a*b*x) + (a**2 + 2*a*b*x)**(3/2)/3)/(a*b) + A*e**2*(a**4*sqrt(a**2 + 2*a*b*x) - 2*a **2*(a**2 + 2*a*b*x)**(3/2)/3 + (a**2 + 2*a*b*x)**(5/2)/5)/(2*a**2*b**2) + B*d**2*(-a**2*sqrt(a**2 + 2*a*b*x) + (a**2 + 2*a*b*x)**(3/2)/3)/(a*b) + B *d*e*(a**4*sqrt(a**2 + 2*a*b*x) - 2*a**2*(a**2 + 2*a*b*x)**(3/2)/3 + (a**2 + 2*a*b*x)**(5/2)/5)/(a**2*b**2) + B*e**2*(-a**6*sqrt(a**2 + 2*a*b*x) + a **4*(a**2 + 2*a*b*x)**(3/2) - 3*a**2*(a**2 + 2*a*b*x)**(5/2)/5 + (a**2 + 2 *a*b*x)**(7/2)/7)/(4*a**3*b**3))/(2*a*b), Ne(a*b, 0)), ((A*d**2*x + A*d*e* x**2 + A*e**2*x**3/3 + B*d**2*x**2/2 + 2*B*d*e*x**3/3 + B*e**2*x**4/4)/sqr t(a**2), True))
Time = 0.20 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.28 \[ \int \frac {(A+B x) (d+e x)^2}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx=-\frac {5 \, B a e^{2} x^{2}}{6 \, b^{2}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B e^{2} x^{2}}{3 \, b^{2}} + \frac {5 \, B a^{2} e^{2} x}{3 \, b^{3}} + \frac {A d^{2} \log \left (x + \frac {a}{b}\right )}{b} - \frac {B a^{3} e^{2} \log \left (x + \frac {a}{b}\right )}{b^{4}} + \frac {{\left (2 \, B d e + A e^{2}\right )} x^{2}}{2 \, b} - \frac {2 \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B a^{2} e^{2}}{3 \, b^{4}} - \frac {{\left (2 \, B d e + A e^{2}\right )} a x}{b^{2}} + \frac {{\left (2 \, B d e + A e^{2}\right )} a^{2} \log \left (x + \frac {a}{b}\right )}{b^{3}} - \frac {{\left (B d^{2} + 2 \, A d e\right )} a \log \left (x + \frac {a}{b}\right )}{b^{2}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} {\left (B d^{2} + 2 \, A d e\right )}}{b^{2}} \]
-5/6*B*a*e^2*x^2/b^2 + 1/3*sqrt(b^2*x^2 + 2*a*b*x + a^2)*B*e^2*x^2/b^2 + 5 /3*B*a^2*e^2*x/b^3 + A*d^2*log(x + a/b)/b - B*a^3*e^2*log(x + a/b)/b^4 + 1 /2*(2*B*d*e + A*e^2)*x^2/b - 2/3*sqrt(b^2*x^2 + 2*a*b*x + a^2)*B*a^2*e^2/b ^4 - (2*B*d*e + A*e^2)*a*x/b^2 + (2*B*d*e + A*e^2)*a^2*log(x + a/b)/b^3 - (B*d^2 + 2*A*d*e)*a*log(x + a/b)/b^2 + sqrt(b^2*x^2 + 2*a*b*x + a^2)*(B*d^ 2 + 2*A*d*e)/b^2
Time = 0.28 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.34 \[ \int \frac {(A+B x) (d+e x)^2}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\frac {2 \, B b^{2} e^{2} x^{3} \mathrm {sgn}\left (b x + a\right ) + 6 \, B b^{2} d e x^{2} \mathrm {sgn}\left (b x + a\right ) - 3 \, B a b e^{2} x^{2} \mathrm {sgn}\left (b x + a\right ) + 3 \, A b^{2} e^{2} x^{2} \mathrm {sgn}\left (b x + a\right ) + 6 \, B b^{2} d^{2} x \mathrm {sgn}\left (b x + a\right ) - 12 \, B a b d e x \mathrm {sgn}\left (b x + a\right ) + 12 \, A b^{2} d e x \mathrm {sgn}\left (b x + a\right ) + 6 \, B a^{2} e^{2} x \mathrm {sgn}\left (b x + a\right ) - 6 \, A a b e^{2} x \mathrm {sgn}\left (b x + a\right )}{6 \, b^{3}} - \frac {{\left (B a b^{2} d^{2} \mathrm {sgn}\left (b x + a\right ) - A b^{3} d^{2} \mathrm {sgn}\left (b x + a\right ) - 2 \, B a^{2} b d e \mathrm {sgn}\left (b x + a\right ) + 2 \, A a b^{2} d e \mathrm {sgn}\left (b x + a\right ) + B a^{3} e^{2} \mathrm {sgn}\left (b x + a\right ) - A a^{2} b e^{2} \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{b^{4}} \]
1/6*(2*B*b^2*e^2*x^3*sgn(b*x + a) + 6*B*b^2*d*e*x^2*sgn(b*x + a) - 3*B*a*b *e^2*x^2*sgn(b*x + a) + 3*A*b^2*e^2*x^2*sgn(b*x + a) + 6*B*b^2*d^2*x*sgn(b *x + a) - 12*B*a*b*d*e*x*sgn(b*x + a) + 12*A*b^2*d*e*x*sgn(b*x + a) + 6*B* a^2*e^2*x*sgn(b*x + a) - 6*A*a*b*e^2*x*sgn(b*x + a))/b^3 - (B*a*b^2*d^2*sg n(b*x + a) - A*b^3*d^2*sgn(b*x + a) - 2*B*a^2*b*d*e*sgn(b*x + a) + 2*A*a*b ^2*d*e*sgn(b*x + a) + B*a^3*e^2*sgn(b*x + a) - A*a^2*b*e^2*sgn(b*x + a))*l og(abs(b*x + a))/b^4
Timed out. \[ \int \frac {(A+B x) (d+e x)^2}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx=\int \frac {\left (A+B\,x\right )\,{\left (d+e\,x\right )}^2}{\sqrt {{\left (a+b\,x\right )}^2}} \,d x \]